vcBitmap

Represents an image file used in the application, for example as material textures.

See in: Overview

Module: vcCore

Parent: vcObject

Children -

Referenced by: vcMaterial.Texture, vcPythonProcessHandler.Icon

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
FormatvcBitmapFormatRGets the format of the bitmap.
HeightIntegerRGets the height (in pixels) of the bitmap.
NameStringRWGets or sets the name of the bitmap.
UriStringRGets the URI of the source file of the bitmap.
WidthIntegerRGets the width (in pixels) of the bitmap.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
loadBitmapvcBitmapString argLoads a bitmap image from a given URI.
See more
If loading is successful, the URI filename is used to register the bitmap with the application.

Parameters:
uri (str): The URI of the bitmap.

Exceptions:
RuntimeError: When the bitmap cannot be loaded.

Returns:
vcBitmap: The bitmap.
saveNoneString uri,
Optional Keyword[format = vcBitmapFileFormat]
Saves the bitmap to the given URI.
See more
Parameters:
uri (str): The destination URI.
Optional: format (vcBitmapFileFormat): The destination format. Default is vcBitmapFileFormat.BMP.

Exceptions:
ValueError: When the vcBitmapFileFormat cannot be mapped to a writer module.
RuntimeError: When no writer module is found for the given file format.
RuntimeError: When the bitmap cannot be saved.